#include <iostream>
#include <stdio.h>
#include <cmath>
#include <string>
#include <algorithm>
#include <memory.h>

using namespace std;

const double PI = acos(-1.0);
const double eps = 1e-6;
const double INF = 1e9 + 7;

int prison[100];

/*
o(n^2)
*/
void getVoid(int input[],int n,int c, int t)
{
	int res = 0;

	for (int i = 0; i < n; i++)
	{
		int sum = input[i];

		for (int j = 1; j + i< n && j<c && sum < t; j++)
		{
			sum += input[i];
		}
		if (sum == t)
		{
			res++;
		}
	}

	cout << res<< endl;
}


int main()
{
	freopen("data.in", "r", stdin);
	int n, c, t;
	cin >> n >> c >> t;

	memset(prison, 0, sizeof(prison));
	for (int i = 0; i < n; i++)
	{
		cin >> prison[i];
	}
	getVoid(prison, n, c, t);

	system("pause");
	return 0;
}